import { axios } from '@/utils/request'

const api = {
  poor: '/student/poor'
}

export function getStStudentPoorAnalysis () {
  return axios({
    url: api.poor + '/analysis',
    method: 'get'
  })
}

export function getStStudentPoorInfo (id) {
  return axios({
    url: api.poor + `/get/${id}`,
    method: 'get'
  })
}

export function studentPoorStart (id) {
  return axios({
    url: api.poor + `/start/${id}`,
    method: 'get'
  })
}

export function getStStudentPoorList (parameter) {
  return axios({
    url: api.poor + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveStStudentPoor (parameter) {
  return axios({
    url: api.poor + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delStStudentPoor (parameter) {
  return axios({
    url: api.poor + '/remove',
    method: 'post',
    params: parameter
  })
}

export const poorExport = api.poor + '/export'
